package com.pay.service.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.pay.service.dao.GoodsOrderMapper;
import com.pay.service.pojo.GoodsOrder;
import com.pay.service.service.IGoodsOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

/**
 * @Title: OrderServiceImpl
 * @Description:
 * @author: qzz
 * @version: 1.0
 * @date: 2020/6/12 11:04
 */
@Service
public class GoodsOrderServiceImpl extends ServiceImpl<GoodsOrderMapper, GoodsOrder> implements IGoodsOrderService {
	
	@Autowired
	private GoodsOrderMapper goodsOrderMapper;


	@Override
	public Map<String, Object> deletegOrder(Integer gid, String operationPwd) {
		Map<String,Object> data = new HashMap();
		if(operationPwd.equals("123456")) {
			goodsOrderMapper.deleteById(gid);
			data.put("code",1);
			data.put("msg","商品订单信息已被删除！");
		}else {
			data.put("code",0);
			data.put("msg","操作密码有误！");
			return data;
		}
		return data;
	}


}
